package com.mce.nebula.entity;

import com.mce.nebula.common.BaseEntity;
import jakarta.persistence.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 用户站内信实体，对应Python的UserMessage模型
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "user_message")
public class UserMessage extends BaseEntity {
    
    @Column(name = "message_id", length = 32, nullable = false)
    private String messageId;
    
    @Column(name = "receiver_id", nullable = false)
    private Integer receiverId;
    
    @Column(name = "content", length = 1000, nullable = false)
    private String content;
    
    @Column(name = "is_read", nullable = false)
    private Boolean isRead = false;
    
    @Column(name = "msg_type", length = 32, nullable = false)
    private String msgType;
    
    @Column(name = "announcement_id", length = 32)
    private String announcementId;
    
    @Column(name = "title", length = 64, nullable = false)
    private String title = "title";
    
    @Column(name = "level", length = 32, nullable = false)
    private String level = "low";
}